package zyz.framework.exception;

public class ServiceException extends Exception {
    private static final long serialVersionUID = 5190291468401300592L;

    private String message;

    private String[] params;

    public String getMessage() {
        return message;
    }

    public String[] getParams() {
        return params;
    }

    public ServiceException() {
    }

    /**
     * @param message 鎻愮ず淇℃伅
     */
    public ServiceException(String message) {
        super(message, null);
        this.message = message;
    }

    /**
     * @param message 鎻愮ず淇℃伅
     * @param params  鍥介檯鍖栦俊鎭弬鏁�
     */
    public ServiceException(String message, String[] params) {
        super(message, null);
        this.params = params;
        this.message = message;
    }

    /**
     * @param exception 寮傚父淇℃伅
     */
    public ServiceException(Exception exception) {
        super(exception);
    }

    /**
     * @param message   鎻愮ず淇℃伅
     * @param exception 寮傚父淇℃伅
     */
    public ServiceException(String message, Exception exception) {
        super(message, exception);
        this.message = message;
    }

    /**
     * @param message   鎻愮ず淇℃伅
     * @param exception 寮傚父淇℃伅
     */
    public ServiceException(String message, String[] params, Exception exception) {
        super(message, exception);
        this.params = params;
        this.message = message;
    }
}